#include <iostream>
using namespace std;

#include <vector>
#include <algorithm>

int main()
{
    // vector容器
    vector<int> myVec = {11, 23, 54, 67, 31, 9, 23};
    vector<int> myDst;

    // 初始化目标容器
    myDst.resize(myVec.size());

    // 复制元素
    copy(myVec.begin(), myVec.end(), myDst.begin());

    // 输出结果并验证复制是否成功
    cout << "size: " << myDst.size() << endl;
    if (myDst.size() == myVec.size())
    {
        cout << "Copy successful." << endl;
    }
    else
    {
        cout << "Copy failed." << endl;
    }

    for (int i = 0; i < myDst.size(); i++)
    {
        cout << myDst[i] << " ";
    }

    return 0;
}